QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Managing Macintosh Draw Contexts

QuickDraw 3D provides routines that you can use to create and manipulate Macintosh draw contexts.

Q3MacDrawContext_New

You can use the Q3MacDrawContext_New function to create a new Macintosh draw context.

TQ3DrawContextObject Q3MacDrawContext_New (
                     const TQ3MacDrawContextData *drawContextData);
drawContextData
A pointer to a Macintosh draw context data structure.

DESCRIPTION

The Q3MacDrawContext_New function returns, as its function result, a new draw context object having the characteristics specified by the drawContextData parameter. See "Macintosh Draw Context Structure" for information on the drawContextData parameter.

Q3MacDrawContext_GetWindow

You can use the Q3MacDrawContext_GetWindow function to get the window associated with a Macintosh draw context.

TQ3Status Q3MacDrawContext_GetWindow (
                     TQ3DrawContextObject drawContext,
                     CWindowPtr *window);
drawContext
A Macintosh draw context object.
window
On exit, a pointer to a window.

DESCRIPTION

The Q3MacDrawContext_GetWindow function returns, in the window parameter, a pointer to the window currently associated with the draw context specified by the drawContext parameter.

Q3MacDrawContext_SetWindow

You can use the Q3MacDrawContext_SetWindow function to set the window associated with a Macintosh draw context.

TQ3Status Q3MacDrawContext_SetWindow (
                     TQ3DrawContextObject drawContext,
                     const CWindowPtr window);
drawContext
A Macintosh draw context object.
window
A pointer to a window.

DESCRIPTION

The Q3MacDrawContext_SetWindow function sets the window associated with the draw context specified by the drawContext parameter to the window specified by the window parameter.

Q3MacDrawContext_Get2DLibrary

You can use the Q3MacDrawContext_Get2DLibrary function to get the two-dimensional drawing library associated with a Macintosh draw context.

TQ3Status Q3MacDrawContext_Get2DLibrary (
                     TQ3DrawContextObject drawContext,
                     TQ3MacDrawContext2DLibrary *library);
drawContext
A Macintosh draw context object.
library
On exit, a constant that specifies the two-dimensional graphics library used when rendering an image in the specified draw context. See [link] for the values that can be returned in this field.

DESCRIPTION

The Q3MacDrawContext_Get2DLibrary function returns, in the library parameter, the two-dimensional drawing library currently associated with the draw context specified by the drawContext parameter.

Q3MacDrawContext_Set2DLibrary

You can use the Q3MacDrawContext_Set2DLibrary function to set the two-dimensional drawing library associated with a Macintosh draw context.

TQ3Status Q3MacDrawContext_Set2DLibrary (
                     TQ3DrawContextObject drawContext,
                     TQ3MacDrawContext2DLibrary library);
drawContext
A Macintosh draw context object.
library
A constant that specifies the desired two-dimensional graphics library to be used when rendering an image in the specified draw context. See [link] for the values that can be passed in this field.

DESCRIPTION

The Q3MacDrawContext_Set2DLibrary function sets the two-dimensional drawing library associated with the draw context specified by the drawContext parameter to the library specified by the library parameter.

Q3MacDrawContext_GetGXViewPort

You can use the Q3MacDrawContext_GetGXViewPort function to get the QuickDraw GX view port associated with a Macintosh draw context.

TQ3Status Q3MacDrawContext_GetGXViewPort (
                     TQ3DrawContextObject drawContext,
                     gxViewPort *viewPort);
drawContext
A Macintosh draw context object.
viewPort
On exit, the QuickDraw GX view port currently associated with the specified draw context.

DESCRIPTION

The Q3MacDrawContext_GetGXViewPort function returns, in the viewPort parameter, the QuickDraw GX view port currently associated with the draw context specified by the drawContext parameter. If no view port is associated with the draw context or the two-dimensional graphics library is not set to kQ3Mac2DLibraryQuickDrawGX , Q3MacDrawContext_GetGXViewPort returns NULL in the viewPort parameter.

Q3MacDrawContext_SetGXViewPort

You can use the Q3MacDrawContext_SetGXViewPort function to set the QuickDraw GX view port associated with a Macintosh draw context.

TQ3Status Q3MacDrawContext_SetGXViewPort (
                     TQ3DrawContextObject drawContext,
                     const gxViewPort viewPort);
drawContext
A Macintosh draw context object.
viewPort
The QuickDraw GX view port to be associated with the specified draw context.

DESCRIPTION

The Q3MacDrawContext_SetGXViewPort function sets the QuickDraw GX view port associated with the draw context specified by the drawContext parameter to the view port specified by the viewPort parameter. The two-dimensional graphics library associated with the specified draw context must be kQ3Mac2DLibraryQuickDrawGX .

Q3MacDrawContext_GetGrafPort

You can use the Q3MacDrawContext_GetGrafPort function to get the QuickDraw graphics port associated with a Macintosh draw context.

TQ3Status Q3MacDrawContext_GetGrafPort (
                     TQ3DrawContextObject drawContext,
                     CGrafPtr *grafPort);
drawContext
A Macintosh draw context object.
grafPort
On exit, the QuickDraw graphics port currently associated with the specified draw context.

DESCRIPTION

The Q3MacDrawContext_GetGrafPort function returns, in the grafPort parameter, the QuickDraw graphics port currently associated with the draw context specified by the drawContext parameter. If no graphics port is associated with the draw context or the two-dimensional graphics library is not kQ3Mac2DLibraryQuickDraw , Q3MacDrawContext_GetGrafPort returns NULL in the grafPort parameter.

Q3MacDrawContext_SetGrafPort

You can use the Q3MacDrawContext_SetGrafPort function to set the QuickDraw graphics port associated with a Macintosh draw context.

TQ3Status Q3MacDrawContext_SetGrafPort (
                     TQ3DrawContextObject drawContext,
                     const CGrafPtr grafPort);
drawContext
A Macintosh draw context object.
grafPort
The QuickDraw graphics port to be associated with the specified draw context.

DESCRIPTION

The Q3MacDrawContext_SetGrafPort function sets the QuickDraw graphics port associated with the draw context specified by the drawContext parameter to the graphics port specified by the grafPort parameter. The two-dimensional graphics library associated with the specified draw context must be kQ3Mac2DLibraryQuickDraw .


© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |